package com.woniuxy.test;

import java.io.IOException;
import java.io.InputStream;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * @BelongsProject: java-85-course-code
 * @BelongsPackage: com.woniuxy.test
 * @Author: LiTongMiao
 * @Date: 2022/2/28 16:12
 * @Description: TODO
 */
public class MyJedisServer {
    public static void main(String[] args) throws IOException {
        ServerSocket serverSocket=new ServerSocket(6380);
        Socket accept = serverSocket.accept();
        InputStream inputStream = accept.getInputStream();
        byte[] bytes=new byte[1024];
        inputStream.read(bytes);
        System.out.println(new String(bytes));
        accept.close();
        serverSocket.close();
    }
}
